package pers.chao.cacheable.core.consts;

import pers.chao.tool.date.TimeConst;

/**
 * Description: redis缓存时间单位，选择任意单位后，
 * 程序会自动将选择的任意时间单位都转换为ms
 *
 * @author W.Chao
 * @date 2020/9/19 23:31
 **/
public enum CacheExpireUnit {
	YEAR(TimeConst.YEAR),
	WEEK(TimeConst.WEEK),
	DAY(TimeConst.DAY),
	HOUR(TimeConst.HOUR),
	MIN(TimeConst.MINUTE),
	SEC(TimeConst.SECOND),
	MSEC(TimeConst.MILLISECOND);

	private String unit;

	CacheExpireUnit(String value) {
		this.unit = value;
	}

	public String getUnit() {
		return unit;
	}
}
